import Vue from 'vue'
import SvgIcon from '@/components/SvgIcon' // svg component

// 全局注册
Vue.component('svg-icon', SvgIcon)

const req = require.context('./svg', false, /\.svg$/)
const req1 = require.context('./svg1', false, /\.svg$/)
/* 转化为数组存储 */
const requireAll = requireContext => requireContext.keys().map(requireContext)
requireAll(req)
requireAll(req1)